Subscribe Us

Responsive Advertisement

Advertisement

1206A Choose Two Numbers codeforces solution in cpp

 

1206A Choose Two Numbers codeforces  solution in cpp

by ujjal roy



#include<bits/stdc++.h>

using namespace std;

main()

{

    int t,j,n,m,c=0,i;

   int maxa=0,maxb=0;

    cin>>n;

    int a[n];

    for(i=0;i<n;i++)

    {

        cin>>a[i];

        if(a[i]>maxa)maxa=a[i];

    }

     cin>>m;

    int b[m];

    for(i=0;i<m;i++)

    {

        cin>>b[i];

        if(b[i]>maxb)

        {

            maxb=b[i];


        }

    }

    cout<<maxa<<" "<<maxb<<endl;

    return 0;

}


Post a Comment

0 Comments